package com.test.multithread.future;

import java.util.function.Consumer;

class ConDemo2 {
    private static void girl(Consumer<String> one, Consumer<String> two, String[] arr) {
        for (String s : arr) {
            one.andThen(two).accept(s);
        }
    }

    public static void main(String[] args) {
        String[] arr = {
                "苍井空,女",
                "波多野结衣,女",
                "泷泽萝拉,女",
                "小泽玛利亚,女",
        };
        girl(
                (s) -> System.out.print("姓名：" + s.split(",")[0]),
                (s) -> System.out.println("；姓名：" + s.split(",")[1]),
                arr
        );
    }
}
